﻿namespace WMS6.Web
{
    using System.Collections.Generic;
    using System.Data;
    using WMS6.Web.AnalyticsReportServiceRef;

    public class AnalyticsReportServiceClientProxy : BasePage
    {
        public DataSet GetAdjustMentRptDataSet(InvAdjustmentRptQueryEntity invAdjustmentRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetAdjustMentRptDataSet(invAdjustmentRptQueryEntity, pubParasInfo);
            }
        }

        public List<ASNStatusRptInfo> GetASNStatusRptInfo(ASNStatusRptQueryEntity receiptDetailRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetASNStatusRptInfo(receiptDetailRptQueryEntity, pubParasInfo);
            }
        }

        public DataSet GetCustomerReturnDetailRptDataSet(CustomerReturnDetailRptQueryEntity customerReturnDetailRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetCustomerReturnDetailRptDataSet(customerReturnDetailRptQueryEntity, pubParasInfo);
            }
        }

        public List<DiffCountRptInfo> GetDiffCountReportList(DiffCountRptQueryEntity diffCountRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetDiffCountReportList(diffCountRptQueryEntity, pubParasInfo);
            }
        }

        public List<EmptyLocationRptInfo> GetEmptyLocationRptInfo(EmptyLocationRptQueryEntity emptyLocationRptQuery)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetEmptyLocationRptInfo(emptyLocationRptQuery, pubParasInfo);
            }
        }

        public DataSet GetFinanceInOutStockDetailRptDataSet(FinanceInOutStockDetailRptQueryEntity financeInOutStockDetailRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetFinanceInOutStockDetailRptDataSet(financeInOutStockDetailRptQueryEntity, pubParasInfo);
            }
        }

        public DataSet GetFinanceSalesDetailByDateRptDataSet(FinanceSalesDetailRptQueryEntiry financeSalesDetailRptQueryEntiry)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetFinanceSalesDetailByDateRptDataSet(financeSalesDetailRptQueryEntiry, pubParasInfo);
            }
        }

        public DataSet GetFinanceSalesDetailReportDataSet(FinanceSalesDetailRptQueryEntiry financeSalesDetailRptQueryEntiry)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetFinanceSalesDetailRptDataSet(financeSalesDetailRptQueryEntiry, pubParasInfo);
            }
        }

        public DataSet GetGlobalInventoryRptDataSet(GlobalInventoryRptQueryEntity globalInventoryRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            pubParasInfo.CurrentWH = "10";
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetGlobalInventoryRptDataSet(globalInventoryRptQueryEntity, pubParasInfo);
            }
        }

        public DataSet GetIdleInventoryRptDataSet(IdleInventoryRptQueryEntiry idleInventoryRptQueryEntiry)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetIdleInventoryRptDataSet(idleInventoryRptQueryEntiry, pubParasInfo);
            }
        }

        public DataSet GetInOutBlanaceRptDataSet(InOutBlanaceRptQueryEntity inOutBlanaceRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetInOutBlanaceRptDataSet(inOutBlanaceRptQueryEntity, pubParasInfo);
            }
        }

        public DataSet GetInOutStockRptDetailInfo(InOutStockRptDetailQueryEntity inOutStockRptDetailQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetInOutStockRptDetailInfo(inOutStockRptDetailQueryEntity, pubParasInfo);
            }
        }

        public DataSet GetInoutStockRptInfo(InOutStockRptQueryEntity InOutStockRptQuery)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetInOutStockRptInfo(InOutStockRptQuery, pubParasInfo);
            }
        }

        public static AnalyticsReportServiceClientProxy GetInstance()
        {
            return new AnalyticsReportServiceClientProxy();
        }

        public DataSet GetInvLocSkyTransRptDataSet(InvLocSkyTransRptQueryEntity invLocSkyTransRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetInvLocSkyTransRptDataSet(invLocSkyTransRptQueryEntity, pubParasInfo);
            }
        }

        public List<LocationRptInfo> GetLocationRptInfo(LocationRptQueryEntity locationRptQuery)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetLocationRptInfo(locationRptQuery, pubParasInfo);
            }
        }

        public DataSet GetOnTheWayOrderRptDataSet(OnTheWayOrderRptQueryEntity onTheWayOrderRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetOnTheWayOrderRptDataSet(onTheWayOrderRptQueryEntity, pubParasInfo);
            }
        }

        public DataSet GetOperationLogDataSet(OperationLogQueryEntity operationLogQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetOperationLogDataSet(operationLogQueryEntity, pubParasInfo);
            }
        }

        public DataSet GetOwnerTransferRptDataSet(OwnerTransferRptQueryEntity ownerTransferRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetOwnerTransferRptDataSet(ownerTransferRptQueryEntity, pubParasInfo);
            }
        }

        public DataSet GetPhysicalCountReportDataSet(PhysicalCountDiffRptQueryEntity physicalCountDiffRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetPhysicalCountReportDataSet(physicalCountDiffRptQueryEntity, pubParasInfo);
            }
        }

        public List<PhysicalCountRptInfo> GetPhysicalCountReportList(PhysicalCountRptQueryEntity physicalCountRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetPhysicalCountReportList(physicalCountRptQueryEntity, pubParasInfo);
            }
        }

        public DataSet GetPickingRptInfo(PickingRptQueryEntity PickingRptQuery)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetPickingRptInfo(PickingRptQuery, pubParasInfo);
            }
        }

        public DataSet GetPurchasePlanRptDataSet(PurchasePlanRptQueryEntity purchasePlanRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetPurchasePlanRptDataSet(purchasePlanRptQueryEntity, pubParasInfo);
            }
        }

        public List<ReceiptDetailRptInfo> GetReceiptDetailRptInfo(ReceiptDetailRptQueryEntity receiptDetailRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetReceiptDetailRptInfo(receiptDetailRptQueryEntity, pubParasInfo);
            }
        }

        public List<ReceiptRptInfo> GetReceiptRptInfo(ReceiptRptQueryEntity ReceiptRptQuery)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetReceiptRptInfo(ReceiptRptQuery, pubParasInfo);
            }
        }

        public DataSet GetSafeInventoryRptInfo(SafeInventoryRptQueryEntity safeInventoryRptQuery)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetSafeInventoryRptInfo(safeInventoryRptQuery, pubParasInfo);
            }
        }

        public DataSet GetShelflifeRptInfo(ShelflifeRptQueryEntity ShelflifeRptQuery)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetShelflifeRptInfo(ShelflifeRptQuery, pubParasInfo);
            }
        }

        public DataSet GetShipmentOrderDetailRptInfo(ShipmentOrderDetailRptQueryEntity shipmentOrderDetailRptQuery)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetShipmentOrderDetailRptInfo(shipmentOrderDetailRptQuery, pubParasInfo);
            }
        }

        public DataSet GetShipmentOrderRptInfoByShipmentOrderRptQueryEntity(ShipmentOrderRptQueryEntity shipmentOrderRptQuery)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetShipmentOrderRptInfoByShipmentOrderRptQueryEntity(shipmentOrderRptQuery, pubParasInfo);
            }
        }

        public DataSet GetShipmentOrderRptStatistics(ShipmentOrderRptQueryEntity shipmentOrderRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetShipmentOrderRptStatistics(shipmentOrderRptQueryEntity, pubParasInfo);
            }
        }

        public List<ShipmentOrderStatusRptInfo> GetShipmentOrderStatusRptInfo(ShipmentOrderStatusRptQueryEntity shipmentOrderStatusRptQuery)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetShipmentOrderRptInfo(shipmentOrderStatusRptQuery, pubParasInfo);
            }
        }

        public DataSet GetShipmentStatByCustomerRptDataSet(ShipmentStatByCustomerRptQueryEntity shipmentStatByCustomerRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetShipmentStatByCustomerRptDataSet(shipmentStatByCustomerRptQueryEntity, pubParasInfo);
            }
        }

        public DataSet GetShipmentStatByOrderRptDataSet(ShipmentStatByOrderRptQueryEntity shipmentStatByOrderRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetShipmentStatByOrderRptDataSet(shipmentStatByOrderRptQueryEntity, pubParasInfo);
            }
        }

        public DataSet GetShipmentStatSplitCustomerRptDataSet(ShipmentStatSplitCustomerRptQueryEntity shipmentStatSplitCustomerRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetShipmentStatSplitCustomerRptDataSet(shipmentStatSplitCustomerRptQueryEntity, pubParasInfo);
            }
        }

        public DataSet GetStockRptInfo(StockRptQueryEntity stockRptQuery)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetStockRptInfo(stockRptQuery, pubParasInfo);
            }
        }

        public DataSet GetVendorReturnDetailRptDataSet(VendorReturnDetailRptQueryEntity vendorReturnDetailRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetVendorReturnDetailRptDataSet(vendorReturnDetailRptQueryEntity, pubParasInfo);
            }
        }

        public DataSet GetWarehouseTransferRptDateSet(WarehouseTransferRptQueryEntity warehouseTransferRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GetWarehouseTransferRptDateSet(warehouseTransferRptQueryEntity, pubParasInfo);
            }
        }

        public DataSet GlobalInventoryWithWHRptDataSet(GlobalInventoryWithWHRptQueryEntity globalInventoryWithWHRptQueryEntity)
        {
            PubParasInfo pubParasInfo = this.InitPubParasInfo();
            pubParasInfo.CurrentWH = "10";
            using (AnalyticsReportServiceClient client = new AnalyticsReportServiceClient("WSHttpBinding_IAnalyticsReportService"))
            {
                return client.GlobalInventoryWithWHRptDataSet(globalInventoryWithWHRptQueryEntity, pubParasInfo);
            }
        }

        private PubParasInfo InitPubParasInfo()
        {
            return new PubParasInfo { UserID = base.UserInfo.UserID, UserLanguage = base.UserInfo.Preference.Lang, CurrentWH = base.UserInfo.CurrentWH };
        }
    }
}

